import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
Vue.prototype.$http=axios
Vue.use(ElementUI)
//axios.defaults.baseURL='http://127.0.0.1:8888/api/private/v1/'
axios.defaults.baseURL='http://127.0.0.1:8091/'
//拦截器验证token
axios.interceptors.request.use(config => {
  // console.log(config)
  //config.headers.Authorization = window.sessionStorage.getItem('token')
  config.headers.token = window.sessionStorage.getItem('token')
  // 在最后必须 return config
  return config
})
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
